﻿using Smobiler.Core;
using Smobiler.Core.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;
using FubiManger.UI;

namespace FubiManger.Controls
{
    ////ToolboxItem用于控制是否添加自定义控件到工具箱，true添加，false不添加
    //[System.ComponentModel.ToolboxItem(true)]
    partial class freshgoodcontrol : Smobiler.Core.Controls.MobileUserControl
    {
        public freshgoodcontrol() : base()
        {
            //This call is required by the SmobilerUserControl.
            InitializeComponent();
        }

        private void btndel_Press(object sender, EventArgs e)
        {
            msgcontrol con = new msgcontrol();
            con.title = "删除提示";
            con.content = "您确定要删除该商品吗？";
            this.Form.ShowDialog(con, (obj, args) =>
            {
                if (con.flag == true)
                {
                    fresh_goodsDal.Delgood(lblfgid.Text);
                    ((AdddayfoodForm)this.Form).Getdate();
                }
            });
        }

        private void freshgoodcontrol_Load(object sender, EventArgs e)
        {
            if (lblsell.Text == "0")
                lblsell.Text = "正常商品";
            else
                lblsell.Text = "测试商品";
        }
    }
}